package com.scu.dao;
import com.scu.pojo.Message;
import com.scu.pojo.MessageSearch;
import org.apache.ibatis.annotations.Param;

import java.util.List;
public interface MessageDao {
    public List<Message> checkMessage(@Param("info")MessageSearch info,@Param("index")int index,@Param("limit")int limit);
    public int markReadMessage(@Param("u_id")int u_id);
    public int deleteMessage(@Param("u_id")int u_id,@Param("m_id")int m_id);
    public int responseMessage(@Param("m_writer_id")int m_writer_id,@Param("m_receiver_id")int m_receiver_id,@Param("m_content")String m_content);
    public List<Message> checkUndeliveredMessage(@Param("m_writer_id")int m_writer_id);
    public int sentUndeliveredMessage(@Param("u_id")int u_id,@Param("m_id")int m_id);
    List<Message> checkMessageByPage(@Param("info")MessageSearch info,@Param("index")int index,@Param("limit")int limit);
    int getMessageCount(@Param("info")MessageSearch info);
    List<Message> checkUndeliveredMessageByPage(@Param("info")MessageSearch info,@Param("index")int index,@Param("limit")int limit);
    public int getUndeliveredMessageCount(@Param("info")MessageSearch info);
}
